Add 4.0 deprecation warning macros
authorBastien Nocera <hadess@hadess.net>
Mon, 25 Feb 2019 16:31:14 +0000 (17:31 +0100)
committerBastien Nocera <hadess@hadess.net>
Mon, 25 Feb 2019 16:38:08 +0000 (17:38 +0100)
Note that functions deprecated in 4.0 will cause deprecation warnings
even with the pre-4.0 GTK development versions.

gdk/gdkversionmacros.h.in

index 5b413f1704889449679d28c27d878a97da46c106..856501119770e6ed38b153a226c30f4eb3504af0 100644 (file)
@@ -54,6 +54,7 @@
 
 #define GDK_VERSION_3_92        (G_ENCODE_VERSION (3, 92))
 #define GDK_VERSION_3_94        (G_ENCODE_VERSION (3, 94))
+
 /**
  * GDK_VERSION_4_0:
  *
 # define GDK_AVAILABLE_IN_4_0                _GDK_EXTERN
 #endif
 
+#if GDK_VERSION_MIN_REQUIRED >= GDK_VERSION_3_92
+# define GDK_DEPRECATED_IN_4_0                GDK_DEPRECATED
+# define GDK_DEPRECATED_IN_4_0_FOR(f)         GDK_DEPRECATED_FOR(f)
+#else
+# define GDK_DEPRECATED_IN_4_0                _GDK_EXTERN
+# define GDK_DEPRECATED_IN_4_0_FOR(f)         _GDK_EXTERN
+#endif
 
 #endif  /* __GDK_VERSION_MACROS_H__ */